<?php

defined('BY_JYA') or exit('error');
$cashierid=$this->checklogin();
$_RQ['op']=$_RQ['op']?$_RQ['op']:'index';
if($_RQ['op']=='index'){	
	$return['item']=$this->plugin_setting('user'.$cashierid);	
	$htmls=array(
		'type'=>'edit',
		'post'=>'post',
		
		'edit'=>array(
				
					array('type'=>'radio','title'=>'手机端收款','name'=>'mobile_pay','options'=>'status'),
					array('type'=>'radio','title'=>'使用商城余额','name'=>'use_credit2','options'=>'status'),
			)
	);
	
	$return['category']=pdo_getall('jy_cashier_category',array('uniacid'=>$_SESSION['uniacid']),array('id','title'));
	$return['htmls']=$htmls;
	$return['status']=array('0'=>'关闭','1'=>'开启');
	exi($return);
}
if($_RQ['op']=='post'){
	$post=get_postdata();
	$this->plugin_setting('user'.$cashierid,$post);
	exi('设置成功！');
}
